<?php 
/**
*file commlist.php
* 评论列表显示
*
*/
define('ACC', true);
require('../include/init.php');
//用户检查
if (empty($_SESSION['username'])) {
	header("location:../index.php");
}

$tag = new TagModel();

$page = isset($_GET['page'])?$_GET['page']+0:1; //当前页
$total = $tag->tagTotal();//总条数
$pagenumber = 16;         //每页条数
$offset = ($page-1)*$pagenumber;//计算偏移量$offset //是第N页的位置

//根据偏移量跟每页显示数据 取出所有评论 
$taglist = $tag->tagList($offset,$pagenumber);

//分页
$pag = new PageTool($total,$page,$pagenumber);
$pagcode = $pag->paging();
//print_r($pagcode);



include(ROOT.'/view/admin/tag.html');


?>